<template>
  <a-modal v-model:visible="_d.visible" title="我的账户" 
  	okText="确认"
  	cancelText="取消"
  	@ok="handleOk">
    <a-descriptions :column="1" bordered :labelStyle="{width: '120px'}">
	    <a-descriptions-item label="登录用户名">{{ _d.info.code }}</a-descriptions-item>
	    <a-descriptions-item label="昵称">{{ _d.info.name }}</a-descriptions-item>
	    <a-descriptions-item label="手机号码">{{ _d.info.systemUserId }}</a-descriptions-item>
	    <a-descriptions-item label="创建时间">{{ dayjs(_d.info.createDate).format('YYYY-MM-DD HH:mm:ss') }}</a-descriptions-item>
	  </a-descriptions>
  </a-modal>
</template>

<script setup>
	import { reactive, ref, onMounted } from 'vue'
	import {Form, notification} from "ant-design-vue";

	import {ApiGet} from "@/api/request.js";
	import dayjs from 'dayjs';

	const _d = reactive({
		visible: false,
		info: {}
		
	})

	function open() {
		_d.visible = true;

		getData();
	}

	function getData() {
		ApiGet("/Web/getcurrentuserinfo").then(res => {
			_d.info = res.data;
		})
	}

	function handleOk() {
		_d.visible = false;
	}

	defineExpose({
		open
	})

</script>

<style lang="less" scoped>

</style>